// 点击注册转到注册页面
var registertop = document.querySelector(".top-register");
registertop.onclick = function () {
    registertop.classList.add("bar");
    let loginform = document.querySelector(".login");
    let reform = document.querySelector(".register");
    let logintop = document.querySelector(".top-login");
    logintop.classList.remove("bar");
    registertop.classList.add("bar");
    reform.classList.add("index");
};
var logintop = document.querySelector(".top-login");
logintop.addEventListener("click", function () {
    let loginform = document.querySelector(".login");
    let reform = document.querySelector(".register");
    let logintop = document.querySelector(".top-login");
    registertop.classList.remove("bar");
    reform.classList.remove("index");
    logintop.classList.add("bar");
});

var link = document.querySelector(".link");
link.onclick = function () {
    registertop.onclick();
};
